var express = require('express');
var request = require('request');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  request('http://music.163.com/discover/playlist/?order=hot&cat=%E5%85%A8%E9%83%A8&limit=35&offset=35', (error, response, body) => {
    if (!error && response.statusCode == 200) {
      data = body;
      res.send(data);
    } else {
      console.log(error);
    }
  });
});

module.exports = router;
